import request from '@/utils/request'

//列表
export function textbookList(data) {
	return request({
		url: '/admin/textbook/textbookList',
		method: 'get',
		params: data
	})
}
//新增
export function saveTextbook(data) {
	return request({
		url: '/admin/textbook/saveTextbook',
		method: 'post',
		data
	})
}
//更新
export function updateTextbook(data) {
	return request({
		url: '/admin/textbook/updateTextbook',
		method: 'post',
		data
	})
}
//删除
export function removeTextbook(data) {
	return request({
		url: '/admin/textbook/removeTextbook',
		method: 'delete',
		params: data
	})
}
//更新教材启用/禁用状态	
export function updateState(data) {
	return request({
		url: '/admin/textbook/updateState',
		method: 'put',
		params: data
	})
}
//根据教材id查询教材详情	
export function selectTextbookDetail(data) {
	return request({
		url: '/admin/textbook/selectTextbookDetail',
		method: 'get',
		params: data
	})
}
//查询教材列表	
export function selectTextbookList(data) {
	return request({
		url: '/admin/textbook/selectTextbookList',
		method: 'get',
		params: data
	})
}
//根据教材id查询教材目录
export function selectTextbookDirectory(data) {
	return request({
		url: '/admin/textbook/selectTextbookDirectory',
		method: 'get',
		params: data
	})
}

//新增教材-章
export function saveTextbookChapter(data) {
	return request({
		url: '/admin/textbookChapter/saveTextbookChapter',
		method: 'post',
		data
	})
}
//更新教材-章	
export function updateTextbookChapter(data) {
	return request({
		url: '/admin/textbookChapter/updateTextbookChapter',
		method: 'post',
		data
	})
}
//删除教材-章	
export function removeTextbookChapter(data) {
	return request({
		url: '/admin/textbookChapter/removeTextbookChapter',
		method: 'delete',
		params: data
	})
}

//新增教材-节	
export function saveTextbookChapterSection(data) {
	return request({
		url: '/admin/textbookChapterSection/saveTextbookChapterSection',
		method: 'post',
		data
	})
}
//更新教材-节		
export function updateTextbookChapterSection(data) {
	return request({
		url: '/admin/textbookChapterSection/updateTextbookChapterSection',
		method: 'post',
		data
	})
}
//删除教材-节		
export function removeTextbookChapterSection(data) {
	return request({
		url: '/admin/textbookChapterSection/removeTextbookChapterSection',
		method: 'delete',
		params: data
	})
}

//新增教材-内容	
export function saveTextbookChapterSectionContent(data) {
	return request({
		url: '/admin/textbookChapterSectionContent/saveTextbookChapterSectionContent',
		method: 'post',
		data
	})
}
//更新教材-内容		
export function updateTextbookChapterSectionContent(data) {
	return request({
		url: '/admin/textbookChapterSectionContent/updateTextbookChapterSectionContent',
		method: 'post',
		data
	})
}
//删除教材-内容	
export function removeTextbookChapterSectionContent(data) {
	return request({
		url: '/admin/textbookChapterSectionContent/removeTextbookChapterSectionContent',
		method: 'delete',
		params: data
	})
}

//根据教材-节id查询教材-内容列表
export function selectTextbookContentList(data) {
	return request({
		url: '/admin/textbookChapterSectionContent/selectTextbookContentList',
		method: 'get',
		params: data
	})
}
//批量新增/修改教材-内容	
export function saveBatchTextbookSectionContent(data) {
	return request({
		url: '/admin/textbookChapterSectionContent/saveBatchTextbookSectionContent',
		method: 'post',
		data
	})
}
//获取教材章数量
export function selectTextbookChapterCount(data) {
	return request({
		url: '/admin/textbook/selectTextbookChapterCount',
		method: 'get',
		params: data
	})
}
//AI生成教材内容	
export function generateTextbookSectionContent(data) {
	return request({
		url: '/admin/textbookChapterSectionContent/generateTextbookSectionContent',
		method: 'post',
		data
	})
}

//教材目录(分配教材目录使用)
export function selectTextbookDirectoryByUserId(data) {
	return request({
		url: '/admin/textbook/selectTextbookDirectoryByUserId',
		method: 'get',
		params: data
	})
}
//教师列表
export function teacherSectionInfoList(data) {
	return request({
		url: '/admin/textbookSectionTeacher/teacherSectionInfoList',
		method: 'get',
		params: data
	})
}

//教材分页列表(根据用户查询)
export function textbookListByUserId(data) {
	return request({
		url: '/admin/textbook/textbookListByUserId',
		method: 'get',
		params: data
	})
}